home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWMemory / SLMemMgr.h < prev   
Encoding:
Text File  |  1996-09-17  |  2.8 KB  |  92 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLMemMgr.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SLMEMMGR_H
  11. #define SLMEMMGR_H
  12.  
  13. #include <stddef.h>
  14.  
  15. #ifndef FWSTDDEF_H
  16. #include "FWStdDef.h"
  17. #endif
  18.  
  19. #if defined(FW_BUILD_MAC) && !defined(__MEMORY__)
  20. #include <Memory.h>
  21. #endif
  22.  
  23. #if defined(FW_BUILD_MAC) && !defined(__ERRORS__)
  24. #include <Errors.h>
  25. #endif
  26.  
  27. #ifdef FW_BUILD_WIN32
  28.  
  29. #include <Windows.h>
  30.  
  31. // Windows 32 API macro that conflicts with a method in FW_CMemoryManager
  32. #ifdef CopyMemory
  33. #undef CopyMemory
  34. #endif
  35.  
  36. #endif
  37.  
  38. // Export or Import functions for CFM-68K [sfu]
  39.  
  40. #if defined(FW_ODFLIB_IMPORT)
  41. #pragma import on
  42. #elif defined(FW_ODFLIB)
  43. #pragma export on
  44. #endif
  45.  
  46. FW_EXTERN_C_BEGIN
  47.  
  48. //========================================================================================
  49. // Forward class declarations
  50. //========================================================================================
  51.  
  52. struct MemHeap;
  53.  
  54. //========================================================================================
  55. // External procedure definitions
  56. //========================================================================================
  57.  
  58. extern void FW_PrivMemoryManager_CopyMemory(const void* const source,
  59.                                             void* const destination,
  60.                                             unsigned long bytesToMove);
  61. extern void FW_PrivMemoryManager_SetMemory(void* aBlock,
  62.                                            unsigned long bytesToSet,
  63.                                            unsigned char byteValue);
  64. extern void* FW_PrivMemoryManager_AddOffsetToPointer(void* pointer, unsigned long offset);
  65.  
  66. extern void* FW_PrivMemoryManager_AllocateBlock(unsigned long bytesRequested);
  67. extern void* FW_PrivMemoryManager_ResizeBlock(void* aBlock, unsigned long bytesRequested);
  68. extern unsigned long FW_PrivMemoryManager_GetBlockSize(const void* aBlock);
  69. extern void FW_PrivMemoryManager_FreeBlock(void* aBlock);
  70.  
  71. extern FW_PlatformHandle FW_PrivMemoryManager_AllocateSystemHandle(unsigned long bytesRequested);
  72. extern FW_PlatformHandle FW_PrivMemoryManager_ResizeSystemHandle(FW_PlatformHandle aHandle,
  73.                                                                     unsigned long bytesRequested);
  74. extern void FW_PrivMemoryManager_FreeSystemHandle(FW_PlatformHandle aHandle);
  75. extern void* FW_PrivMemoryManager_LockSystemHandle(FW_PlatformHandle aHandle);
  76. extern void FW_PrivMemoryManager_UnlockSystemHandle(FW_PlatformHandle aHandle);
  77. extern unsigned long FW_PrivMemoryManager_GetSystemHandleSize(FW_PlatformHandle aHandle);
  78. extern FW_PlatformHandle FW_PrivMemoryManager_CopySystemHandle(FW_PlatformHandle aHandle);
  79.  
  80. FW_EXTERN_C_END
  81.  
  82. // For CFM-68K [sfu]
  83.  
  84. #if defined(FW_ODFLIB_IMPORT)
  85. #pragma import off
  86. #elif defined(FW_ODFLIB)
  87. #pragma export off
  88. #endif
  89.  
  90.  
  91. #endif
  92.